import request from '@/utils/request'

// 查询外部攻击列表
export function listAttack(query) {
  return request({
    url: '/insurance/attack/list',
    method: 'get',
    params: query
  })
}

// 查询外部攻击详细
export function getAttack(attackId) {
  return request({
    url: '/insurance/attack/' + attackId,
    method: 'get'
  })
}

// 新增外部攻击
export function addAttack(data) {
  return request({
    url: '/insurance/attack',
    method: 'post',
    data: data
  })
}

// 修改外部攻击
export function updateAttack(data) {
  return request({
    url: '/insurance/attack',
    method: 'put',
    data: data
  })
}

// 删除外部攻击
export function delAttack(attackId) {
  return request({
    url: '/insurance/attack/' + attackId,
    method: 'delete'
  })
}
